<template>
	<view class="classifyItem" @click="ItemclickHander">
		<view class="img">
			<image :src="classifyItemData.menuImg" mode="aspectFill"></image>
		</view>
		<view class="title text-cut">
			{{classifyItemData.menuName}}
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {

			};
		},
		props: {
			classifyItemData: {
				type: Object,
				default: {}
			}
		},
		methods: {
			ItemclickHander() {
				this.$emit('click', this.classifyItemData.menuId)
			}
		}
	}
</script>

<style lang="scss">
	.classifyItem {
		margin-top: 30upx;
		width: 100%;
		padding: 0upx 20upx;

		.img {
			width: 100%;
			padding-bottom: 124%;
			height: 0;
			overflow: hidden;
			position: relative;
			border-radius: 10upx;

			image {
				background: transparent;
				position: absolute;
				width: 100%;
				height: 100%;
			}
		}

		.title {
			margin-top: 10upx;
			line-height: 54upx;
		}
	}
</style>
